package com.dy.lock.screen.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.CommonCommentDao;
import com.dy.lock.screen.pojo.CommonCommentInfo;
import com.dy.lock.screen.vo.CommonCommentLikeVo;

@Repository("commonCommentDao")
public class CommonCommentDaoImpl extends
		BaseDaoImpl<CommonCommentInfo, String> implements CommonCommentDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.CommonCommentMapper";
	}

	@Override
	public CommonCommentInfo queryByPrimaryKey(String id) {
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".selectByPrimaryKey", id);
	}

	@Override
	public List<CommonCommentInfo> queryByCommentId(Map<String, Object> para) {
		List<CommonCommentInfo> list = this.getSqlSession().selectList(
				getQueryNamespace() + ".queryByCommentId", para);
		return list;
	}

	@Override
	public int falseDelete(CommonCommentInfo commonInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().update(
				getQueryNamespace() + ".falseDelete", commonInfo);
	}

	@Override
	public CommonCommentLikeVo queryDetailByPrimaryKey(String id) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryDetailByPrimaryKey", id);
	}

}
